<template>
  <div>
    <el-timeline>
      <el-timeline-item
        v-for="version in versions"
        :key="version.id"
        :timestamp="version.timestamp"
        :placement="version.placement"
      >
        <el-card>
          <div class="header">
            <span class="time">{{ version.timestamp }}</span>
            <span class="user">{{ version.user }}</span>
          </div>
          <div class="content">
            <p>{{ version.reason }}</p>
            <p>{{ version.status }}</p>
          </div>
        </el-card>
      </el-timeline-item>
    </el-timeline>
  </div>
</template>

<script>
export default {
  data() {
    return {
      versions: [
        {
          id: 1,
          timestamp: '2022-01-01 10:00',
          user: 'John Doe',
          reason: 'Initial version',
          status: 'Active'
        },
        {
          id: 2,
          timestamp: '2022-01-02 14:30',
          user: 'Jane Smith',
          reason: 'Bug fix',
          status: 'Active'
        },
        // Add more versions here
      ]
    };
  }
};
</script>

<style scoped>
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.time {
  font-weight: bold;
}

.user {
  color: #999;
}

.content {
  margin-top: 10px;
}
</style>